package com.gsy.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 静态资源配置
 */
@Configuration
public class CustomWebMvcConfigurer implements WebMvcConfigurer {
	@Bean
	public LoginHandlerInterceptor getLoginHandlerInterceptor(){
		return new LoginHandlerInterceptor();
	}

	@Autowired
	private LoginHandlerInterceptor loginHandlerInterceptor;

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(loginHandlerInterceptor);
	}
}
